﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ApptStatusModification.aspx.vb" Inherits="DARSClients.ApptStatusModification" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Beyond DARS - Appoinment Status Modification </title>
     <link id="myCSS" href="Styles/myStyle.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
         .style1
        {
            font-size: x-large;
            color: #003300;
        }
        .style2
        {
            color: #990000;
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="container">
    <div class="style1">
    
        <strong>Appointment Modification</strong></div>
    <br />
    <br />
    AdvisorID:
    <asp:Label ID="Label1" runat="server" Text="Label" style="font-size: large"></asp:Label>
    <br />
    Advisor Name:
    <asp:Label ID="Label2" runat="server" Text="Label" style="font-size: large"></asp:Label>
    <span class="style2"><strong>
    <br />
    <br />
    </strong></span>
    <br />
    <asp:Label ID="Label6" runat="server" 
        Text="Please Select the Appointment DateTime you wish to modify. "></asp:Label>
    <br />
    <asp:Label ID="Label7" runat="server" 
        Text="Select &quot;Edit&quot; to Modify DateTime and Appointment Status."></asp:Label>
    <br />
    <asp:Label ID="Label8" runat="server" 
        Text="Select &quot;Delete&quot; to delete an appointment."></asp:Label>
    <br />
    <br />
    <asp:Label ID="lblSubmit" runat="server" ForeColor="#003300" 
        style="font-size: x-large"></asp:Label>
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        CellPadding="3" DataKeyNames="AdvisorID,DateTime" DataSourceID="SqlDataSource1" 
        ForeColor="Black" GridLines="Vertical" EmptyDataText="N/A" 
        ShowHeaderWhenEmpty="True" BackColor="White" BorderColor="#999999" 
        BorderStyle="Solid" BorderWidth="1px">
        <AlternatingRowStyle BackColor="#CCCCCC" />
        <Columns>
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                ShowSelectButton="True" HeaderText="Modify/Delete" />
            <asp:BoundField DataField="AdvisorID" HeaderText="AdvisorID" ReadOnly="True" 
                SortExpression="AdvisorID" />
            <asp:BoundField DataField="DateTime" HeaderText="DateTime" 
                SortExpression="DateTime" />
            <asp:BoundField DataField="StudentID" HeaderText="StudentID" 
                SortExpression="StudentID" ReadOnly="True" />
            <asp:BoundField DataField="Reason" HeaderText="Reason" 
                SortExpression="Reason" ReadOnly="True" />
            <asp:TemplateField HeaderText="Status" SortExpression="Status">
                <EditItemTemplate>
                    <asp:DropDownList ID="DropDownList2" runat="server" 
                        SelectedValue='<%# Bind("Status") %>'>
                        <asp:ListItem>Unconfirmed</asp:ListItem>
                        <asp:ListItem>Accept</asp:ListItem>
                        <asp:ListItem>Reject</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Status") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#CCCCCC" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#808080" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#383838" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:FA11_4296_BeyondDARSConnectionString %>" 
        OldValuesParameterFormatString="original_{0}" 
        
        SelectCommand="SELECT * FROM [Appointment] WHERE ([AdvisorID] = @AdvisorID)">
        <SelectParameters>
            <asp:SessionParameter Name="AdvisorID" SessionField="CurrentAdvisorID" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <asp:Label ID="Label3" runat="server" ForeColor="#003300" 
        style="font-size: large" Text="Edit an existing appointments DateTime:"></asp:Label>
    <asp:Button ID="Button1" runat="server" Text="Click Here" />
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" 
        CellPadding="3" DataKeyNames="AdvisorID,DateTime" DataSourceID="SqlDataSource1" 
        ForeColor="Black" GridLines="Vertical">
        <AlternatingRowStyle BackColor="#CCCCCC" />
        <Columns>
            <asp:BoundField DataField="AdvisorID" HeaderText="AdvisorID" ReadOnly="True" 
                SortExpression="AdvisorID" />
            <asp:BoundField DataField="DateTime" HeaderText="DateTime" ReadOnly="True" 
                SortExpression="DateTime" />
            <asp:BoundField DataField="StudentID" HeaderText="StudentID" 
                SortExpression="StudentID" />
            <asp:BoundField DataField="Reason" HeaderText="Reason" 
                SortExpression="Reason" />
            <asp:BoundField DataField="Status" HeaderText="Status" 
                SortExpression="Status" />
        </Columns>
        <FooterStyle BackColor="#CCCCCC" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#808080" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#383838" />
    </asp:GridView>
    <br />
    <asp:Label ID="Label4" runat="server" style="text-align: left" 
        Text="1. Select existing appt DateTime you wish to modify:"></asp:Label>
    <br />
    <asp:DropDownList ID="DropDownList3" runat="server" 
        DataSourceID="SqlDataSource2" DataTextField="DateTime" 
        DataValueField="DateTime">
    </asp:DropDownList>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:FA11_4296_BeyondDARSConnectionString %>" 
        SelectCommand="SELECT [DateTime] FROM [Appointment] WHERE ([AdvisorID] = @AdvisorID)">
        <SelectParameters>
            <asp:SessionParameter Name="AdvisorID" SessionField="CurrentAdvisorID" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <asp:Label ID="Label5" runat="server" 
        Text="2. Enter a new appt DateTime to replace the one selected above:"></asp:Label>
    <br />
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <br />
    <asp:Button ID="Button2" runat="server" Text="Update" />
    <br />
    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
    <br />
    </div>
    <div class="footer">
        <a><input  type="submit" class="text_button" id="btnLogout" runat="server" 
                value="Logout" causesvalidation="False" />
           <input type="submit" class="text_button" id="btnhome" runat="server" 
                value="Home" causesvalidation="False" /> </a>
        </div>
    </form>
</body>
</html>
